The present invention generally relates to a packet transmission/reception processor, and more particularly relates to a technique of exchanging packetized data using an IEEE 1394 digital interface.
Generally speaking, digital data is usually transmitted or received on a packet-by-packet basis. An IEEE 1394 interface is a typical one of various digital interfaces that exchange packetized data. As used herein, an “IEEE 1394 interface” means a next-generation high-speed serial interface, which is now being standardized by the Institute of Electrical and Electronic Engineers, Inc. (IEEE).
An IEEE 1394 interface can cope with two types of packet exchange, namely, isochronous and asynchronous packet exchange methods. The isochronous packet exchange is utilized to transfer data from an audiovisual appliance (e.g., digital video camera), from which real-time transmission is demanded strongly. On the other hand, the asynchronous packet exchange is utilized to transfer data from personal computer or external storage like hard disk drive. In that case, the data does not always have to be transferred in real time but must be highly accurate and reliable.
IEEE 1394-compliant asynchronous packets include a “request packet” representing an action to be performed and a “response packet” returning a result of an action performed responsive to a request packet. No matter whether a recipient has received request packet or response packet, the recipient always returns an acknowledge (ack) packet, which represents the reception state of the packet, to its sender. Unless the reception of an ack packet, returned in response to a request packet, completes processing, request and response packets are usually used in pairs. A packet exchange sequence using request and response packets is called a “transaction”.
Hereinafter, it will be described with reference to FIG. 14 how an asynchronous transaction is carried out sequentially where Initiator sends out a request packet to Responder.
First, Initiator sends out a request packet to Responder B. On receiving the request packet, Responder returns an ack packet to Initiator. The ack packet returned may represent that the request packet should be sent again (ack—busy), that the request packet has been received safely but is now being processed (ack—pending) or that the action requested is complete (ack—complete). In the illustrated example, Responder returns an ack—busy packet to Initiator as shown in FIG. 14.
Responsive to the ack—busy packet, Initiator re-transmits the same request packet to Responder again. On receiving the request packet, Responder returns an ack-pending packet to Initiator this time.
As described above, the ack—pending packet represents that Responder has received the request packet safely but is now processing it. Accordingly, receiving this ack—pending packet, Initiator waits for Responder to return a response packet associated with the request packet.
The IEEE 1394 standard defines a time-out so that an action aborted, if any, can be detected during a transaction performed using request and response packets. Specifically, if an initiator receives no response packet even after a predetermined amount of time has passed since the initiator received an ack—pending packet responding to a request packet, then it is determined that the action requested was aborted due to some abnormality. Then, the initiator that sent the request packet can start the next transaction.
Stated otherwise, the responder that received the request packet should return an associated response packet within the predetermined amount of time. An initial value of the predetermined time is set to 100 ms, but is arbitrarily changeable at each end. On the other hand, if the responder has returned an ack—complete packet, then the initiator may start the next transaction immediately and does not have to return any response packet.
An “asynchronous connection” is known as one of the IEEE 1394 protocols utilizing the asynchronous packet exchange technique. The asynchronous connection is a transfer protocol defined for packet exchange between a “producer node” sending out a request packet and a “consumer node” returning a response packet. The asynchronous connection protocol is implementable by a system such as that shown in FIG. 15, for example. In the system shown in FIG. 15, a controller (e.g., set top box) issues a command for a consumer node (e.g., printer), thereby connecting the consumer node and a producer node (e.g., digital video camera) together. The connection protocol thereof is as follows.                (1) First, the controller performs a resource allocation on a plug control register (PCR) of the consumer node. In response, the consumer node returns an assigned plug address to the controller.        (2) Next, the controller supplies the plug address at the consumer node to the producer node, thereby initializing the producer node. In response, the producer node also returns its plug address to the controller.        (3) Then, the controller sends the plug address at the producer node to the consumer node to complete the connection.        
When the connection is completed, the consumer node secures a memory region (which will be herein called a “segment buffer region”) for storing the data transmitted from the producer node and issues a lock request (LRQ) packet to the producer node as shown in FIG. 16. In response, the producer node returns a lock response (LRS) packet to the consumer node as indicated by (a).
Then, the producer node sends data, which has been stored in a memory region with consecutive addresses as defined by the application on the transmitting end (which will also be called a “segment buffer region” herein), to the consumer node in the form of a block write request (BWRQ) packet. The IEEE 1394 standard defines the maximum size of a data field included in a packet that can be transmitted at a time. Accordingly, if the size of the data in the segment buffer region is greater than the maximum size, then the data is divided into multiple sections and then those divided sections are transmitted one by one. On receiving the BWRQ packet, the consumer node returns an ack—pending packet to the producer node. Next, the consumer node reads the address of the data included in the received packet and then stores the received data in the segment buffer region defined by the application on the receiving end. After the consumer node has entirely stored the data field of the received packet in the segment buffer region, the consumer node returns a write response (WRS) packet to the producer node as indicated by (b). On receiving the response packet, the producer node sends an ack—complete packet to the consumer node as indicated by (c). Transactions like this will be carried on until the data, stored in the segment buffer region defined by the application on the transmitting end, has been transmitted completely. These transactions are collectively called “data transfer processing”.
When the producer node has transferred all the data from the application on the transmitting end to the application on the receiving end (i.e., at the consumer node), the producer node sends a lock request (LRQ) packet, representing that the transfer is complete, to the consumer node. In response, the consumer node returns a lock response (LRS) packet to the producer node as indicated by (d). In this case, the segment buffer regions as defined by the applications on the transmitting and receiving ends have the same top address and the same size. Also, the producer node sequentially sends the data stored in the segment buffer region and the consumer node also sequentially stores the data, included in the received packets, in the segment buffer region defined by the application on the receiving end.
Moreover, the asynchronous connection protocol requires that if the producer node fails to transmit the next request packet within 2 seconds after having received a response packet from the consumer node during data transfer, the producer node must send a request packet, indicating that state, to the consumer node as in (C) in FIG. 17. A processing step like this will be herein called “heartbeat processing”.
Furthermore, unless the consumer node receives the next request packet or a packet indicating the heartbeat processing within 5 seconds after having sent the response packet, the consumer node must enter the time-out processing.
FIG. 18 illustrates a circuit performing such processing.
As shown in FIG. 18, one end of an IEEE 1394 serial bus 12a is connected to a physical layer controller 13, while the other end thereof is connected to another system (or node). A register 31 is coupled to a CPU by way of another bus 12g. The physical layer controller 13 performs various functions including initializing the bus 12a, arbitration and controlling a bias voltage. A link core circuit 14 receives a packet, transferred through the bus 12a, by way of the physical layer controller 13. Also, the link core circuit 14 generates or detects an error correction code for/from the packet received, adds a sign bit to the packet or detects the code (e.g., an ack packet code), for example. Moreover, the link core circuit 14 outputs a packet, which has been supplied from a transmission buffer 36, onto the bus 12a via the physical layer controller 13. Furthermore, the link core circuit 14 has a retry function. That is to say, even if the link core circuit 14 once failed to transfer a packet, the circuit 14 can try transferring the same packet again.
When the CPU writes header information on the register 31, data to be transmitted is sent to a packet transmitter 35. In response, the packet transmitter 35 makes a packet, which is then stored on the transmission buffer 36. In making the packet, the packet transmitter 35 provides the information about the packet to be transmitted for a reception controller 34. When the packet supplied from the packet transmitter 35 is written on the transmission buffer 36, the transmission buffer 36 passes the packet to the link core circuit 14. And then the link core circuit 14 transmits the packet by way of the physical layer controller 13.
On the other hand, the reception controller 34 receives a packet from the link core circuit 14 and analyzes the contents of the header field included in the packet. Also, to accurately identify the received packet (or to see if this is the packet that should be received in response to the packet transmitted), the reception controller 34 obtains information about the transmitted packet from the packet transmitter 35. Then, the reception controller 34 analyzes the information by comparing it to the header information of the received packet. Based on a result of the analysis, the reception controller 34 determines whether or not the packet should be accepted. And the reception controller 34 controls and instructs the link core circuit 14 not to accept the received packet if the packet is not paired with the transmitted packet.
The packet receiver 33 passes the received packet from the reception controller 34 to a packet reception buffer 32 so that the packet is stored on the buffer 32. And the CPU can read out the packet, stored on the packet reception buffer 32, by way of the register 31.
As described above, the IEEE 1394 defines a time-out to detect an action aborted during a transaction performed using request and response packets.
On the other hand, in the asynchronous connection protocol, if the data, included in the received packet, cannot be stored successfully in the segment buffer region at the consumer node within an amount of time defined by the IEEE 1394, then the consumer node cannot return a response packet in response to a request packet. Accordingly, a time-out is produced at the producer node.
However, the asynchronous connection protocol does not define how the processing should end at the producer node in case of time-out. Accordingly, a system complying with the protocol could not be established. Furthermore, since the producer node has already received an ack—pending packet, representing that the packet has been received safely, the time-out starts the next transaction while the current transaction is still incomplete. As a result, multiple transactions should be handled in parallel and multiple received packets should be processed at a time, thus making it much more complicated to establish a desired system.
Also, the asynchronous connection protocol demands that if the producer node cannot transmit the next request packet within 2 seconds after having received a response packet from the consumer node, the producer node must perform heartbeat processing to indicate the state. On the other hand, unless the consumer node receives the next request packet or the packet indicating the heartbeat processing within 5 seconds after having sent the response packet, the consumer node must enter the time-out processing. Thus, the asynchronous connection protocol requires a time management method different from the method applicable to data exchange using request and response packets in accordance with the IEEE 1394.
Furthermore, to transmit or receive a packet indicating the heartbeat processing at an arbitrary time, the producer node should perform time management in determining when the making and transmission of packets should be restarted, carried out or stopped. The consumer node should also perform time management to determine when the processing of received packets should be restarted, carried out or stopped.
Accordingly, the asynchronous connection protocol demands a packet transmission/reception processor that can transmit and receive packets while executing all of these functions.